package org.finesys.common.disruptor.event.translator;

import com.lmax.disruptor.EventTranslatorOneArg;
import org.finesys.common.disruptor.event.DisruptorEvent;

public class DisruptorEventOneArgTranslator implements EventTranslatorOneArg<DisruptorEvent, DisruptorEvent> {


    @Override
    public void translateTo(DisruptorEvent disruptorEvent, long sequence, DisruptorEvent bind) {
        disruptorEvent.setEvent(bind.getEvent());
        disruptorEvent.setTag(bind.getTag());
        disruptorEvent.setKey(bind.getKey());
        disruptorEvent.setGrade(bind.getGrade());
        disruptorEvent.setBody(bind.getBody());
        disruptorEvent.setMessageTime(bind.getMessageTime());
    }
}
